package com.dailyblue.java.boot.security.project.controller;

import com.dailyblue.java.spring.boot.commons.util.JsonResult;
import com.dailyblue.java.spring.boot.commons.util.ResultTool;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/roles")
@RestController
@CrossOrigin
public class RoleController {

    @RequestMapping("/update_role")
    @PreAuthorize("hasAuthority('/roles/update_role')")
    public JsonResult find_power(){
        return ResultTool.success("修改角色");
    }
}
